import utils.request_util as request_util
import bs4
# 虞姬文化园：https://www.lingbi.gov.cn/mllb/whly/lyjd/141335061.html
# 钟馗文化园：https://www.lingbi.gov.cn/mllb/whly/lyjd/141334921.html
# 奇石文化园：https://www.lingbi.gov.cn/mllb/whly/lyjd/141334791.html
lb_government = "https://www.lingbi.gov.cn/" # 灵璧县人民政府网址
url = "https://www.lingbi.gov.cn/mllb/whly/lyjd/141335061.html"
html_doc = request_util.text(url) # 获取整个网页
soup = bs4.BeautifulSoup(html_doc,"html.parser")
imgs = soup.select(".newscontnet img") # 获取图片列表
for img in imgs:
    request_util.file(lb_government + img["src"], "虞姬文化园")  # 下载到本地
